#pragma once

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include <clocale>
#include <algorithm>
#include <vector>
#include "Candy.h"
#include "ArticleException.h"

using namespace std;



class Chocolate : public Candy
{
protected:
	string type;

public:
	Chocolate(string name = "", double price = -1, int number = -1, double customerPrice = -1, string type = "")
		: Candy(name, price, number, customerPrice)
	{
		this->type = type;
		if (type == ""){
			throw ArticleException("Exception class Chocolate: Field type is an empty string");
		}
	}

	~Chocolate();

	string ToString() //Betyg 5
	{
		ostringstream oss;
		oss << Article::ToString();
		oss << "(" << type << ")" << endl;
		return oss.str();
	}

};

